<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title></title>
            <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        </head>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/index/css/header.css" />
        <script type="text/javascript" src="__PUBLIC__/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/upload/jquery.uploadify.min.js"></script>
        <script type="text/javascript" src="__PUBLIC__/index/js/momen.js"></script>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/upload/uploadify.css" />
        <style type="text/css">  
            .uploadify-button {
                background-color: transparent;
                border: none;
                padding: 0;
                border-radius:0;
            }
            .uploadify:hover .uploadify-button {
                background-color: transparent;
                border-radius:0;
            }
        </style>
        <script>
            
            var url = "__URL__";
            var app = "__APP__";
            var pu =  "__PUBLIC__";
            var thump = "<?php echo ($_SESSION['thump']); ?>";
            var star= "<?php echo ($_SESSION['start']); ?>";
            
            $(function(){   
                var temp_h1 = document.body.clientHeight;
                var temp_h2 = document.documentElement.clientHeight;
                var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false;   
                var htmlbody = isXhtml?document.documentElement:document.body;
                var w = $(window).width();
                var h = $(window).height();
                
                var documentH = $(document).height();
                $('.floor').css({left:Math.floor(w-1170)/2});
                $('.new_link').css({left:(w-1170)/2,top:38});
                var time = null;
                var time1 = null;
                $('.nav_user').hover(function(){
                    clearTimeout(time1);
                    clearTimeout(time);
                    $('.nav_link').show();
                },function(){
                    time = setTimeout(function(){
                        $('.nav_link').hide();
                    },1000)
                })
                $('.nav_link').hover(function(){
                    clearTimeout(time);
                    clearTimeout(time1);
                },function(){
                    time1 = setTimeout(function(){
                        $('.nav_link').hide();
                    },1000)
                })
                var stop = true;
                var istop = true;
                var scroll = true;
                if(star == 1){
                    scroll = false;
                    istop = false;
                    $('.lcon').addClass('close');
                    $('.header').css({height:38});
                }
                $('.lcon').click(function(){
                    if(stop){
                        $('.new_link').css({'position':'relative'})
                        if(istop){
                            $(this).addClass('close');
                            $('.header').animate({height:38},300);
                            istop = false;
                        }else{
                            $(this).removeClass('close');
                            $('.header').animate({height:216},300);
                            istop = true;
                        }
                    }else{
                        if(scroll){
                            $('.new_link').css({'position':'fixed'});
                            $(this).removeClass('close');
                            scroll = false;
                        }else{
                            $(this).addClass('close');
                            $('.new_link').css({'position':'relative'})
                            scroll = true;
                        }
                    }
                }
            )
                $('.totop').css('bottom',-77)
                var bstop = true;  
                var astop = true;
                var time = null;
                var bsty = true;
                $(window).scroll(function(){
                    if(!bsty){
                        clearInterval(time);
                    }
                    bsty = false;
                    var scrollTop = $(this).scrollTop(); 
                    if(scrollTop>178){
                        stop = false;
                        if(bstop){
                            $('.totop:not(:animated)').animate({bottom:0},500,function(){
                                bstop = false;
                            })
                        }
                        if(istop){
                            $('.lcon').addClass('close');

                        }
                        if(!scroll){
                            $('.lcon').addClass('close');
                            $('.new_link').css({'position':'relative'})
                            scroll = true;
                        }
                    }else{
                        stop = true;
                        if(!bstop){
                            $('.totop:not(:animated)').animate({bottom:-77},function(){
                                bstop = true;
                            })
                        }
                        if(istop){
                            $('.lcon').removeClass('close');
                        }
                    }
                })
                $('.totop').click(function(){
                    var scroll = $(window).scrollTop();
                    clearInterval(time);
                    time = setInterval(function(){
                        if( $(window).scrollTop()==0){
                            clearInterval(time);
                        }
                        bsty = true;
                        var s =Math.ceil($(window).scrollTop())/5;
                        if(s<200){
                            s=200;
                        }
                        document.body.scrollTop = $(window).scrollTop()-s;
                        document.documentElement.scrollTop = $(window).scrollTop()-s;   
                        
                    },70)
                })
                //点击登录
  
                $('.loginback').css({width:w,height:h-38})
                $('.login_btn ,.login').click(function(){
                    $('.loginback').show().animate({opacity:1},500);
                    $('.login_box').animate({top:0},500)
                    htmlbody.style.overflow = "hidden";  
                })
                $('.login_close').click(function(){
                    $('.login_box').animate({top:-290},500,function(){
                        $('.loginback').show().animate({opacity:0},500).hide();
                        $('.right_error').hide();
                        $('.username').val('');
                        $('.password').val('');
                    })
                    htmlbody.style.overflow = "auto";
                })
                $('.mean a').hover(function(){
                    $(this).css({color:'#A3282A'})
                    $(this).children('span').addClass('hover')
                },function(){
                    $(this).css({color:'#000'})
                    $(this).children('span').removeClass('hover')
                })
                //点击添加
                $('.upback').css({width:w,height:h})
                $('.nav_add').click(function(){
                    htmlbody.style.overflow = "hidden";
                    $('.upback').show();
                    $('.toadd').show();
                })
                $('.up_a').hover(function(){
                    $(this).children('div').addClass('hover');
                },function(){
                    $(this).children('div').removeClass('hover');
                })
                $('.up_close,.succ_close').click(function(){
                    $('.upback').hide();
                    $('.create').hide();
                    $('.success').hide();
                    $('.upimg').hide();
                    $('.showupimg img').remove();
                    $('.showimg,.rese').hide();
                    htmlbody.style.overflow = "auto";
                })
                
                //点击创建画布
                $('.create_huab').click(function(){
                    $(this).parent().hide();
                    $('.create').show();
                })
                $('.create_ul li .select').click(function(event){
                    // $(this).hide();
                    event.stopPropagation();
                    $('.sort_check').show();
                    
                })
                $('.sort_check .type ,.up_check .type,.sort_check1 .type ,.type3').live('mouseover',function(){
                    $(this).addClass('hover');
                }).live('mouseout',function(){
                    $(this).removeClass('hover')
                })
                $('.sort_check .type').click(function(){
                    
                    $('.sortid').attr({name:$(this).attr('name')});
                    $('.sortid').html($(this).html());
                    $(this).parent().parent().hide();
                    
                })
                $('.up_check .type').live('click',function(event){
                    event.stopPropagation();
                    $('.upsortid').attr({name:$(this).attr('name')});
                    $('.upsortid').html($(this).html());
                    $('.up_check').hide();
                    
                })
                $('.sort_check1 .type').click(function(){
                            
                    $('.sortid1').attr({name:$(this).attr('name')});
                    $('.geitsid').val($(this).attr('name'));
                    $('.sortid1').html($(this).html());
                    $(this).parent().parent().hide();
                            
                })
                $('.upback').click(function(){
                    var nbsp = /^\s*|\s*$/ig;
                    var name = $('.create_huab .name').val();
                    name =name.replace(nbsp,'');
                    //验证用户名是否为空
                    if(name!=''){
                        $('.sort_error').hide();
                    }
                    var sid  = $('.sortid').attr('name');
                    if(sid!=0){
                        $('.sort_error').hide();
                    }
                    $('.sort_check').hide();
                    $('.up_check').hide();
                })
                $('.createbtn').click(function(){
                    var nbsp = /^\s*|\s*$/ig;
                    var name = $('.create_huab .name').val();
                    name =name.replace(nbsp,'');
                    //验证用户名是否为空
                    if(name==''){
                        $('.sort_content').html("请输入名称");
                        $('.sort_error').css({top:23}).show();
                        return false;
                    }
                    var sid  = $('.sortid').attr('name');
                    if(sid==0){
                        $('.sort_content').html("请选择类别");
                        $('.sort_error').css({top:90}).show();
                        return false;
                    }
                    $.post(app+"/?m=Complete&a=vername",{'name':name},function(data){
                        if(data.num==0){
                            $('.sort_content').html("画板名重复");
                            $('.sort_error').css({top:23}).show();
                            return false;
                        }else{
                            $('.create_huab .sid').val(sid);
                            $('.create_form').submit();
                        }
                    },'json')
                })
                $('.up_img').click(function(){
                    $(this).parent().hide();
                })
                $("#uploadify").uploadify({
                    'height':36,
                    'width':148,
                    'swf':pu+'/upload/uploadify.swf',  
                    'uploader':app+"/Index/upload",
                    'fileTypeExts':"*.jpg;*.jpeg;*.gif;*.png",
                    'buttonImage':pu+'/index/images/upload.png',
                    'onUploadSuccess': function (file,data, response) {
                        $('.showimg').show();
                        $('.showupimg img').remove();
                        var img = $("<img/>");               
                        getImg(data,170,2,callback,img); 
                        img.attr('src',data);
                        setTimeout(function(){
                            $('.showupimg').append(img)
                        },200)
                        
                         
                    },
                    'onInit': function () {                        //载入时触发，将flash设置到最小
                        $("#uploadify-queue").hide();
                    } 
                })
                
                
                $('.up_img').click(function(){
                    $(this).parent().hide();
                   
                    $('.upimg').show();
                    $('.rese').hide();
                })
                $('.up_show').click(function(event){
                    event.stopPropagation();
                    $('.up_check').show();
                })
                $('.up_btn').click(function(){
                    var huabname = $('.upsortid').html();
                    var imgsid = $('.upsortid').attr('name');
                    var imgsrc  = $('.showupimg img').attr('src');
                    var imgmesa = $('textarea[name=mesa]').val();
                    $.post(app+'/?m=Complete&a=addimg',{'sid':imgsid,'adres':imgsrc,'mesa':imgmesa},function(data){
                        if(data.num==1){
                            $('.showupimg img').remove();
                            $('.showimg').hide();
                            $('textarea[name=mesa]').val('');
                            $('.upimg').hide();
                            $('.success').show();
                            $('.slian').attr('href',app+'/?m=Complete&a=showhuab&kid='+imgsid)
                            $('.slian').html(huabname);
                                          
                        }
                    },'json')
                })
                //转载图片
                $('.rm_btn').click(function(){
                    var huabname = $('.rese .upsortid').html();
                    var imgsid = $('.rese .upsortid').attr('name');
                    var imgsrc  = $('.rese .showupimg img').attr('src');
                    var imgmesa = $('.rese textarea[name=mesa]').val();
                    $.post(app+'/?m=Complete&a=rmimg',{'sid':imgsid,'adres':imgsrc,'mesa':imgmesa},function(data){
                        if(data.num==1){
                            $('.showupimg img').remove();
                            $('.showimg').hide();
                            $('textarea[name=mesa]').val('');
                            $('.upimg').hide();
                            $('.success').show();
                            $('.slian').attr('href',app+'/?m=Complete&a=showhuab&kid='+imgsid)
                            $('.slian').html(huabname);
                                          
                        }
                    },'json')
                })
                //转载图片
                var uid = "<?php echo ($_SESSION['uid']); ?>";
                $('.turn').live('click',function(){
                    if(!uid){
                        $('.loginback').show().animate({opacity:1},500);
                        $('.login_box').animate({top:0},500)
                        htmlbody.style.overflow = "hidden";  
                    }else{
                        var index = $('.turn').index(this);
                        if($(this).attr('name')==1){
                            var src = $('.this_img img').eq(index).attr('src');
                        }else{
                            var src = $('.bimg .pin img').eq(index).attr('src');
                        }
                        var mesa = $('.bimg .pin p').eq(index).html();
                        $('.upback').show();
                        $('.toadd').hide(); 
                        var img = $("<img/>");
                        getImg(src,170,2,callback,img);
                        img.attr('src',src);
                        $('.reseimg .up_mesa textarea').val(mesa);
                        $('.reseimg .showupimg').append(img);
                        $('.rese,.reseimg').show();
                        htmlbody.style.overflow = "hidden";  
                    }
                })
                //删除图片
                $('.del').css({width:w,height:h-38})
                $('.del .delerr ').css({left:(w-850)/2})
                $('.del_img').click(function(){
                    htmlbody.style.overflow = "hidden";  
                    $('.del').show();
                    $('.del .delerr').animate({top:38},500)
                })
                $('.cancel').click(function(){
                    $('.del .delerr').animate({top:-130},500,function(){
                        $('.del').hide();                     
                        htmlbody.style.overflow = "auto";  
                    });

                })
                $('.sure').click(function(){
                    var id = $('.del_img').attr('name');
                    $.post(app+'/?m=Complete&a=delimg',{'id':id},function(data){
                        if(data.num==1){
                            $('.del .delerr').animate({top:-130},500,function(){
                                $('.del').hide();                     
                                htmlbody.style.overflow = "auto";  
                                location.href=app+'/?m=Complete&a=showhuab&kid='+data.sid;
                            });
                        }
                    },'json')
                })
                $('.attention').live('click',function(){
                    var _this = $(this);
                    if(!uid){
                        $('.loginback').show().animate({opacity:1},500);
                        $('.login_box').animate({top:0},500)
                        htmlbody.style.overflow = "hidden";  
                    }else{
                        var kid = $(this).attr('name');
                        $.post(app+'/?m=Complete&a=atten',{'kid':kid},function(data){
                            if(data.num==1){
                                _this.html('已关注');
                                _this.addClass('relatten');
                                _this.removeClass('attention');
                            }
                        },'json')
                    }
                })
                $('.relatten').live('click',function(){
                    var _this = $(this);
                    var kid = $(this).attr('name');
                    $.post(app+'/?m=Complete&a=rel',{'kid':kid},function(data){
                        if(data.num==1){
                            _this.html('关注');
                            _this.addClass('attention');
                            _this.removeClass('relatten');
                                  
                        }
                    },'json')
                })
                //提交评论
                $('.combtn').live('click',function(){
                    var id = $(this).attr('name');
                    var _this = $(this);
                    var index =  $('.combtn').index(this);
                    var val = $('.comcont').eq(index).val();
                    var parent =  _this.parent().parent().parent();
                    if(val==''){
                        $('.comcont').eq(index).css('background','yellow');
                        setTimeout(function(){ $('.comcont').eq(index).css('background','#fff')},200)
                        return false;
                    }else{
                        $.post(app+'/?m=Index&a=addcom',{'id':id,'cont':val},function(data){
                            if(data.num==1){
                                
                                var box = "<div class='bottom'>";
                                box += "<img src='"+thump+"' width='30' height='30'/> <p><a href='#'>"+data.uname+"</a> :";
                                if(val.length>10){
                                    box +=val.substring(0,10)+'...';
                                }else{
                                    box +=val;
                                }
                                box +="</p>";
                                box += "<a href='javascript:;' class='comment' name='"+id+"' a='1'></a>"
                                box +="</div>";
                                parent.append(box);
                                parent.find('.comment').attr('a',1)
                                _this.parent().parent().remove();
                            }
                        },'json')
                    }
                })
                $('.cont_mesa').click(function(){
                    $('.the_btn').show();
                })
                $('.cont_mesa').keyup(function(){
                    var val = $(this).val();
                    if(val.length>0){
                        $('.com_btn').addClass('btn_click')
                    }else{
                        $('.com_btn').removeClass('btn_click')
                    }
                })
                $('.coent').live( {mouseenter:
                        function()
                    {
                        $(this).children('.delcom,.huifu').css('display','block');},
                    mouseleave:
                        function()
                    {
                        $(this).children('.delcom,.huifu').css('display','none');

                    }
                })
                $('.btn_click').live('click',function(){
                    var parent = $(this).parent().parent();
                    var id = $(this).attr('name');
                    var val = $('.cont_mesa').val();
                    if(!uid){
                        $('.loginback').show().animate({opacity:1},500);
                        $('.login_box').animate({top:0},500)
                        htmlbody.style.overflow = "hidden";  
                    }else{
                        $.post(app+'/?m=Index&a=addcom',{'id':id,'cont':val},function(data){
                            if(data.num==1){
                                var box ="<div class='coent'>";
                                box += "<a href='javascript:;' class='delcom' name='"+data.id+"'></a>";
                                box += "<a href='javascript:;' class='huifu'></a>";
                                box +="<div class='img'><img src='"+thump+"'width='50' height='50'/></div>";
                                box += "<div class='cont'>";
                                box +="<p class='top'><a href='#'>"+data.uname+"</a></p>";
                                box += "<p class='con'>"+val+"</p>"
                                box +="</div></div>";
                                parent.before(box);
                                $('.the_btn').hide();
                                $('.com_btn').removeClass('btn_click')
                                $('.cont_mesa').val('');
                            }
                        },'json')
                    }
                })
                $('.delcom').live('click',function(){
                    var id =$(this).attr('name');
                    var _this = $(this).parent();
                    $.post(app+'/?m=Index&a=delcom',{'id':id},function(data){
                        if(data.num==1){
                            _this.animate({'opacity':0,'height':0},500,function(){
                                _this.remove();
                            })
                            
                        }
                    },'json')
                })
                $('.good').live('click',function(){
                    if(!uid){
                        $('.loginback').show().animate({opacity:1},500);
                        $('.login_box').animate({top:0},500)
                        htmlbody.style.overflow = "hidden";  
                    }else{
                        var _this = $(this);
                        var id = $(this).attr('name');
                        var num = $(this).children('.good_num').html();
                        $('.good_mesa').hide();
                        if(!num){
                            num=0;
                        }
                        $.post(app+'/?m=Index&a=good',{'id':id},function(data){
                            if(data.num==1){
                                num = num-1;
                                if(num==0){
                                    num='';
                                }
                                _this.children('.good_num').html(num);
                                _this.parent().children('.border').children('.good_mesa').hide();
                            }else if(data.num==2){
                                num++;
                                _this.children('.good_num').html(num);
                                _this.parent().children('.border').children('.good_mesa').show();
                            }
                        },'json')
                    }
                })
                $('.bimg .bottom').live( {mouseenter:
                        function()
                    {
                        $(this).children('.comment,.comment1').css('display','block');},
                    mouseleave:
                        function()
                    {
                        $(this).children('.comment,.comment1').css('display','none');

                    }
                }) 
                //点击创建画帮
                $('.new_huaban').click(function(event){
                    event.stopPropagation();
                })
                //转载里创建新画板
                $('.create_new_huaban').keyup(function(){
                    var val = $(this).val();
                    if(val.length>0){
                        $('.new_btn').addClass('new_click')
                    }else{
                        $('.new_btn').removeClass('new_click')
                    }
                })
                $('.new_btn').click(function(){ 
                    var index = $('.new_btn').index(this)
                    var val = $('.create_new_huaban').eq(index).val();
                    var _this = $(this);
                    if(val.length>0){
                        $.post(app+'/?m=Complete&a=ajaxhuaban',{'name':val},function(data){
                            if(data.kid==0){
                                alert('画板名已存在');
                            }else{
                                $('.upsortid,.sortid1').attr('name',data.kid);
                                $('.upsortid,.sortid1').html(val);
                                var li = $("<li class='type'></li>");
                                li.attr('name',data.kid);
                                li.html(val);
                                $('.up_select .up_check ul').append(li);
                                _this.parent().parent().hide()
                            }
                        },'json')
                    }
                })
                 $('.message_img').css({width:$(window).width(),'position':'relative','float':'left'})
            })
        </script>
        <script type="text/javascript" src="__PUBLIC__/index/js/login.js"></script>
        <body>
            <div class="message_img">
                <div class="header">
                    <div class="top">
                        <div class="top_link">
                            <?php if(!empty($_SESSION['uid'])): ?><a href="__APP__/?m=Complete&a=index" class=" k current" style="padding-right:15px">
                                    <span>关注</span>
                                </a>
                                <div class="border"></div><?php endif; ?>
                            <a href="__APP__/?m=Index&a=index" class="discovery k <?php if(empty($_SESSION['uid'])): ?>current<?php endif; ?>">
                                <span>发现</span>
                                <span class="lcon open" onclick="return false"></span>
                            </a>
                            <?php if(!empty($_SESSION['uid'])): ?><div class="border"></div><?php endif; ?>
                            <a href="#" class="fair k">
                                <span>市集</span>
                            </a>

                            <?php if(empty($_SESSION['uid'])): ?><div class="border"></div>
                                <a href="#" class="understand k">
                                    <span>了解花瓣</span>
                                </a><?php endif; ?>
                            <div class="border"></div>
                            <a href="#" class="logo">
                                <img src="__PUBLIC__/index/images/logo_38.png" />
                            </a>
                            <div class="men_bar <?php if(!empty($_SESSION['uid'])): ?>login_men_bar<?php endif; ?>">
                                <div class="search">
                                    <input id="query" class="default_value" type="text" value="" placeholder="搜索你喜欢的" autocomplete="off" name="q">
                                        <a href="#" class="btn"></a>
                                </div>
                                <ul class="top_login">
                                    <li class="nav_user <?php if(!empty($_SESSION['uid'])): ?>login_nav_user<?php endif; ?>">
                                        <?php if(!empty($_SESSION['uid'])): ?><img src="<?php echo ($_SESSION['thump']); ?>" width="20" height="20" />
                                            <?php else: ?>
                                            <a href="javascript:;" class="nav"><em></em></a><?php endif; ?>
                                        <ul class="nav_link  <?php if(!empty($_SESSION['uid'])): ?>login_nav_link<?php endif; ?>">
                                            <?php if(!empty($_SESSION['uid'])): ?><li>
                                                    <a href="<?php echo U('Complete/showuser');?>" class="fantan relay_login">
                                                        <div class="tubiao p"></div>
                                                        <p>我的花瓣</p>
                                                    </a>
                                                </li><?php endif; ?>
                                            <li>
                                                <a href="#" class="phone">
                                                    <div class="tubiao p"></div>
                                                    <div class="value">
                                                        <span>花瓣手机客户端</span>
                                                        <p>Iphone Android</p>
                                                    </div>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" class="caiji">
                                                    <div class="tubiao p"></div>
                                                    <p>花瓣采集工具</p>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" class="fantan">
                                                    <div class="tubiao p"></div>
                                                    <p>花瓣访谈</p>
                                                </a>
                                                <a href="#" class="zoukan">
                                                    <p>花瓣周刊</p>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" class=" fantan help">
                                                    <div class="tubiao p"></div>
                                                    <p>关于&帮助</p>
                                                </a>
                                                <a href="#" class="zoukan">
                                                    <p>用户反馈</p>
                                                </a>
                                                <a href="#" class="zoukan">
                                                    <p>友情链接</p>
                                                </a>
                                                <a href="#" class="zoukan">
                                                    <p>加入我们</p>
                                                </a>
                                            </li>
                                            <?php if(empty($_SESSION['uid'])): ?><li>
                                                    <a href="#" class="fantan login">
                                                        <div class="tubiao p"></div>
                                                        <p>登录</p>
                                                    </a>
                                                    <a href="#" class="zoukan">
                                                        <p>注册</p>
                                                    </a>
                                                </li>
                                                <?php else: ?>
                                                <li>
                                                    <a href="#" class="fantan shez">
                                                        <div class="tubiao p"></div>
                                                        <p>帐号设置</p>
                                                    </a>
                                                    <a href="__APP__/?m=Index&a=quit" class="zoukan">
                                                        <p>退出登录</p>
                                                    </a>
                                                </li><?php endif; ?>
                                        </ul>
                                    </li>
                                    <?php if(!empty($_SESSION['uid'])): ?><li class="nav_add" title="添加"></li>
                                        <?php else: ?>
                                        <li class="login_btn">
                                            <span>登录</span>
                                        </li>
                                        <li class="enter_btn">
                                            <a href="__APP__/Index/enter">注册</a>
                                        </li><?php endif; ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!--导航-->
                    <div class="new_link">
                        <ul class="link">
                            <li class="mean">
                                <a href="#" class="find <?php if(empty($_SESSION['uid'])): ?>hover<?php endif; ?>">
                                    <span class="<?php if(empty($_SESSION['uid'])): ?>hover<?php endif; ?>"></span>
                                    发现
                                </a>
                                <a href="#" class="host">
                                    <span></span>
                                    热门
                                </a>
                                <a href="#" class="video">
                                    <span></span>
                                    视频
                                </a>
                            </li>
                            <li class="menu">
                                <div class="left home">
                                </div>
                                <ul class="right">
                                    <li><a href="#">家居/装饰</a></li>
                                    <li><a href="#">旅行/攻略</a></li>
                                    <li><a href="#">美食/菜谱</a></li>
                                    <li><a href="#">手工/布艺</a></li>
                                    <li><a href="#">潮品/单品</a></li>
                                </ul>
                            </li>
                            <li class="menu">
                                <div class="left celebrity"></div>
                                <ul class="right">
                                    <li><a href="#">名人/明星</a></li>
                                    <li><a href="#">音乐/电影/图书</a></li>
                                    <li><a href="#"> 游戏</a></li>
                                    <li><a href="#">美女</a></li>
                                    <li><a href="#">趣味</a></li>
                                    <li><a href="#">宠物</a></li>
                                    <li><a href="#">童真</a></li>
                                    <li><a href="#"> 动漫</a></li>
                                </ul>
                            </li>
                            <li class="menu">
                                <div class="left illustration"></div>
                                <ul class="right">
                                    <li><a href="#">手绘/插画</a></li>
                                    <li><a href="#">平面/广告/工业设计</a></li>
                                    <li><a href="#">网站/App/Icon</a></li>
                                    <li><a href="#">人文艺术</a></li>
                                    <li><a href="#">摄影</a></li>
                                    <li><a href="#">建筑设计</a></li>
                                </ul>
                            </li>
                            <li class="menu">
                                <div class="left modeling"></div>
                                <ul class="right">
                                    <li><a href="#">造型/美妆</a></li>
                                    <li><a href="#">服饰/街拍/秀场</a></li>
                                    <li><a href="#">婚纱/婚礼</a></li>
                                    <li><a href="#">搭配</a></li>
                                    <li><a href="#">男士风尚</a></li>
                                    <li><a href="#">汽车</a></li>
                                    <li><a href="#">运动/健身</a></li>
                                </ul>
                            </li>
                            <li class="menu">
                                <div class="left life"></div>
                                <ul class="right">
                                    <li><a href="#">生活百科</a></li>
                                    <li><a href="#">数据/图示</a></li>
                                    <li><a href="#">其它</a></li>
                                    <li class="last_life"><a href="#">【周刊】新年新气象指南</a></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div>                
                <!--登录-->
                <div class="loginback">

                    <div class="login_box">
                        <a href="javascript:;" class="login_close"></a>
                        <div class="login_head">
                            <h2>登录花瓣</h2>
                        </div>
                        <div class="login_middle">
                            <div class="login_left">
                                <h5>使用合作网站帐号登录</h5>
                                <div class="web">
                                    <a href="#" class="weibo"></a>
                                    <a href="#" class="doub"></a>
                                    <a href="#" class="renren"></a>
                                    <a href="#" class="qq"></a>
                                </div>
                                <p class="less">未注册过花瓣也可以直接登录哦</p>
                            </div>
                            <div class="login_right">
                                <h5>使用注册邮箱登录</h5>
                                <form action="__APP__/?m=Index&a=gologin" method="post">
                                    <input type="text" name="username" class ="username" placeholder="花瓣注册邮箱" autocomplete="off" class="username"/>
                                    <input type="password" name="password" class="password" placeholder="密码" autocomplete="off" class="password"/>
                                    <a href="javascript:;" class="login_submit qq_btn">
                                        <strong>登录</strong>
                                    </a>
                                </form>
                                <a href="#" class="forgot">忘记密码了吗</a>
                                <div class="right_error">
                                    <span class="arrow">◣</span>
                                    <span class="error_content">邮箱格式不正确</span>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <!--登录--> 
                <!--添加-->

                <div class="upback">
                    <div class="upadd toadd">
                        <div class="up_head">
                            <p>添加</p>
                            <a href="javascript:;" class="up_close"></a>
                        </div>
                        <a href="javascript:;"class="up_a up_webimg">
                            <div></div>
                            采集网页图片
                        </a>
                        <a href="javascript:;"class="up_a up_img">
                            <div></div>
                            上传本地图片
                        </a>
                        <a href="javascript:;"class="up_a create_huab">
                            <div></div>
                            新建画板
                        </a>
                    </div>

                    <!--创建画板-->
                    <div class="upadd create">
                        <div class="up_head">
                            <p>创建画板</p>
                            <a href="javascript:;" class="up_close"></a>
                        </div>
                        <div class="create_huab">
                            <form class="create_form" action="__APP__/?m=Complete&a=addhuab" method="post">
                                <input type="hidden" name="sid" class="sid" value="0"/>
                                <ul class="create_ul">
                                    <li class="hua a">
                                        <label>画板标题</label>
                                        <input type="text" name="name" class="name"/>
                                    </li>
                                    <li class="a">
                                        <label>画板分类</label>
                                        <div class="select">
                                            <span class="sortid" name="0">请选择类型</span>
                                            <span class="down"></span>
                                        </div>
                                    </li>
                                </ul>
                            </form>
                            <div class="sort_check">
                                <ul>
                                     
                                    <?php $db = M("sort");$sort=$db->select();foreach($sort as $field):?><li class="type" name="<?php echo ($field["sid"]); ?>"><?php echo ($field["type"]); ?></li><?php endforeach;?>
                                </ul>
                            </div>
                            <a class="createbtn" href="javascript:;">创建画板</a>
                            <div class="right_error sort_error">
                                <span class="arrow">◣</span>
                                <span class="error_content sort_content"></span>
                            </div>
                        </div>
                    </div>
                    <!--上传图片-->
                    <div class="upadd upimg">
                        <div class="up_head">
                            <p>上传图片</p>
                            <a href="javascript:;" class="up_close"></a>
                        </div>
                        <div class='upinput'>
                            <input type="file" name="uploadify" id="uploadify" />  
                        </div>
                        <div class="showimg">
                            <form action="<?php echo U('Complete/addimg');?>" method="post" class="addimg">
                                <div class="showupimg">

                                </div>
                                <div class="up_select">
                                    <div class="up_show">
                                        <?php $db = M("skedchpat");$sort=$db->where(array("pid"=>$_SESSION["uid"]))->limit(1)->select();foreach($sort as $field):?><span class="upsortid" name="<?php echo ($field["kid"]); ?>"><?php echo ($field["name"]); ?></span>
                                            <span class="updown"></span><?php endforeach;?>
                                    </div>
                                    <div class="up_check">
                                        <ul> 
                                            <?php $db = M("skedchpat");$sort=$db->where(array("pid"=>$_SESSION["uid"]))->select();foreach($sort as $field):?><li class="type" name="<?php echo ($field["kid"]); ?>"><?php echo ($field["name"]); ?></li><?php endforeach;?>
                                        </ul>
                                        <div class='new_huaban'>
                                            <input type="text" placeholder="创建新画板" autocomplete="off" name ="new_huaban" class="create_new_huaban"/>
                                            <p class="new_btn">创建</p>
                                        </div>
                                    </div>
                                    <div class="up_mesa">
                                        <textarea placeholder="搜索你喜欢的" autocomplete="off" name="mesa"></textarea>
                                    </div>
                                    <a href="javascript:;" class="up_btn">采集到</a>
                                </div>
                            </form>
                        </div>

                    </div>
                    <!---上传成功-->
                    <div class="upadd success">
                        <div class="up_head">
                            <p>采集成功</p>
                            <a href="javascript:;" class="up_close"></a>
                        </div>
                        <div class="up_success">
                            <div class="success_head">
                                <p><span class="icon"></span>你已经成功采集到<a href="#" class="slian"></a></p>
                                <p class="href"><a href="#" class="adres">查看这个采集</a> | <a href="javascript:;" class="succ_close">关闭窗口</a></p>
                            </div>
                        </div>
                    </div>

                    <!--转载-->
                    <div class="upadd upimg rese">
                        <div class="up_head">
                            <p>转载</p>
                            <a href="javascript:;" class="up_close"></a>
                        </div>
                        <div class="showimg reseimg">
                            <div class="showupimg">

                            </div>
                            <div class="up_select">
                                <div class="up_show">
                                    <?php $db = M("skedchpat");$sort=$db->where(array("pid"=>$_SESSION["uid"]))->limit(1)->select();foreach($sort as $field):?><span class="upsortid" name="<?php echo ($field["kid"]); ?>"><?php echo ($field["name"]); ?></span>
                                        <span class="updown"></span><?php endforeach;?>
                                </div>
                                <div class="up_check">
                                    <ul> 
                                        <?php $db = M("skedchpat");$sort=$db->where(array("pid"=>$_SESSION["uid"]))->select();foreach($sort as $field):?><li class="type" name="<?php echo ($field["kid"]); ?>"><?php echo ($field["name"]); ?></li><?php endforeach;?>
                                    </ul>
                                    <div class='new_huaban'>
                                        <input type="text" placeholder="创建新画板" autocomplete="off" name ="new_huaban" class="create_new_huaban"/>
                                        <p class="new_btn">创建</p>
                                    </div>
                                </div>
                                <div class="up_mesa">
                                    <textarea placeholder="搜索你喜欢的" autocomplete="off" name="mesa"></textarea>
                                </div>
                                <a href="javascript:;" class="rm_btn">采集到</a>
                            </div>
                        </div>
                    </div>
                </div>

                <!--删除-->
                <div class="del">
                    <div class="delerr">
                        <div class="err">
                            删除采集后不能恢复，确定要删除吗?
                        </div>
                        <div class="dte">
                            <a href="javascript:;" class="btn2 sure">确定</a>
                            <a href="javascript:;" class="btn2 cancel">取消</a>
                        </div>
                    </div>
                </div>




                <!--回到顶部-->
                <div class="totop">
                    回到顶部
                </div>


                <!--底部正在加载-->
                <div class="floor">
                    <img src="__PUBLIC__/index/images/loading.gif"> 正在加载
                </div>


<link rel="stylesheet" type="text/css" href="__PUBLIC__/index/css/user.css" />

<script>
    var url = "__URL__";
    $(function(){
        $('.select1').click(function(event){
            // $(this).hide();
            event.stopPropagation();
            $('.sort_check1').show();    
        })

        $(document).click(function(){
            $('.sort_check1').hide();
        })
                $('.img_save').click(function(){
                    $('.gedit').submit();
                })
             
        $('.middle').css({"minHeight":$(window).height()-60})
    })
</script>
<div class="middle">
    <div class="top">
        <p>编辑采集</p>
    </div>
    <div class="editleft">
        <form action="<?php echo U('Complete/saveImg/id/'.$data['id']);?>" method="post" class="gedit">
            <input type="hidden" name="sid" class="geitsid" value="<?php echo ($data["sid"]); ?>"/>
            <div class="box">
                <div class="tit">
                    <table>
                        <tr>
                            <td>描述</td>
                            <td class="int"><textarea style="width:400px;height:60px" name="mesa"><?php echo ($data["mesa"]); ?></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="box">
                <div class="tit">
                    <table>
                        <tr>
                            <td>画板</td>
                            <td class="int">
                                <div class="select1">
                                    <span class="sortid1" name="<?php echo ($data["id"]); ?>"><?php echo ($data["name"]); ?></span>
                                    <span class="down1"></span>
                                </div>
                                <div class="sort_check1">
                                    <ul>
                                         
                                        <?php $db = M("skedchpat");$sort=$db->where(array("pid"=>$_SESSION["uid"]))->select();foreach($sort as $field):?><li class="type" name="<?php echo ($field["kid"]); ?>"><?php echo ($field["name"]); ?></li><?php endforeach;?>
                                    </ul>
                                    <div class='new_huaban'>
                                        <input type="text" placeholder="创建新画板" autocomplete="off" name ="new_huaban" class="create_new_huaban"/>
                                        <p class="new_btn">创建</p>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="box">
                <div class="tit">
                    <table>
                        <tr>
                            <td>删除</td>
                            <td class="int">
                                <div class="atten">
                                    <a href="javascript::" class="delhuab del_img"  name="<?php echo ($data["id"]); ?>">删除采集</a>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class=""><a href="javascript:;" class="btn1 huabtn img_save">保存设置</a></div>
        </form>
    </div>
    <div class="editright">
        <img src="<?php echo ($data["adres"]); ?>" width="190" />
    </div>
</div>
</body>
</html>